import React, {Component} from 'react';
import axios from 'axios'
import PintuanGuanli from '../../components/pingtuan/pingtuanGL'
import {queryGroupActivities,} from '../../utils/api'

class Pintuanguanli extends Component {
    constructor() {
        super();
        this.state={
            data:'暂无数据'
        }
    }
    componentDidMount() {
        this.huoquData({})
    }
    huoquData(val){
        axios({
            url:queryGroupActivities,
            method:'get',
            params:val
        }).then(data=>{
            console.log(data)
            if (data.data.code===200){
                this.setState({
                    data:data.data.data
                })
            }else{
                this.setState({
                    data:'暂无数据'
                })
            }
        })
    }
    searchData=(val)=>{
        console.log(val)
        this.huoquData({bulk_state:val.bulk_state})
    }
    render() {
        return (
            <div>
                <PintuanGuanli data={this.state.data} search={this.searchData}/>
            </div>
        );
    }
}

export default Pintuanguanli;